public class Solution1420 {
    public int numOfArrays(int n, int m, int k) {
        long[][][] f=new long[n+1][m+1][k+1];
        int mod=1000000007;
        for (int i=1;i<=m;i++){
            f[0][i][1]=1;
        }
        for (int i=1;i<n;i++){
            for (int j=1;j<=m;j++){
                for (int t=1;t<=k;t++){
                    f[i][j][t]=(f[i-1][j][t]*j)%mod;
                    if (t>1){
                        for (int p=1;p<j;p++){
                            f[i][j][t]=(f[i][j][t]+f[i-1][p][t-1])%mod;
                        }
                    }
                }
            }
        }
        long sum=0;
        for (int i=1;i<=m;i++){
            sum=(sum+f[n-1][i][k])%mod;
        }
        return (int)((sum+mod)%mod);
    }

    public static void main(String[] args) {
        System.out.println(new Solution1420().numOfArrays(2,3,1));
    }
}
